From: Florian Müllner Date: Thu, 13 Feb 2020 18:06:51 +0000 (+0100) Subject: unlockDialog: Only show count for multiple notifications X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~777^2^2~39 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ccc64e2621d6d2dc3dda16889ebb3d48a5b21b42;p=gnome-shell.git unlockDialog: Only show count for multiple notifications In the common case where we only have a single unread notification from a particular app, the count doesn't add useful information. Reduce clutter a bit by only showing the notification count if we have at least two. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/997 --- diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 41d0e08cc..0ca62430c 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -99,6 +99,7 @@ var NotificationsBox = GObject.registerClass({ let count = source.unseenCount; let countLabel = new St.Label({ text: `${count}`, + visible: count > 1, style_class: 'unlock-dialog-notification-count-text', }); textBox.add(countLabel); @@ -262,6 +263,7 @@ var NotificationsBox = GObject.registerClass({ } else { let count = source.unseenCount; obj.countLabel.text = `${count}`; + obj.countLabel.visible = count > 1; } obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);